package com.example.cshaoshao.testall.adapters;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.cshaoshao.testall.R;
import com.example.cshaoshao.testall.entities.MultipleItem;

import java.util.List;

/**
 * Created by cshaoshao on 2017/9/3.
 */

public class MultipleItemAdapter extends BaseMultiItemQuickAdapter<MultipleItem,BaseViewHolder>{

    /**
     * Same as QuickAdapter#QuickAdapter(Context,int) but with
     * some initialization data.
     *
     * @param data A new list is created out of this one to avoid mutable list
     */
    public MultipleItemAdapter(List<MultipleItem> data) {
        super(data);
        addItemType(MultipleItem.Type_1, R.layout.type_one_activity);
        addItemType(MultipleItem.Type_2, R.layout.type_two_activity);
        addItemType(MultipleItem.Type_3, R.layout.type_three_activity);
        addItemType(MultipleItem.Type_4, R.layout.type_four_activity);
    }

    @Override
    protected void convert(BaseViewHolder helper, MultipleItem item) {
        switch (helper.getItemViewType())
        {
            case MultipleItem.Type_1:
                break;
            case MultipleItem.Type_2:
                break;
            case MultipleItem.Type_3:
                break;
            case MultipleItem.Type_4:
                break;
        }

    }
}
